﻿Imports System
Imports System.Linq
Imports System.Data
Imports System.Web
Imports Equipment.DataAccess

<Serializable()> _
Public Class DepartmentWrapper

#Region "Properties"
    Public SiteID As Integer
    Public ID As Integer
    Public Description As String
#End Region

    Public Shared Function ConvertToWrapperList(ByVal departmentSource As IQueryable(Of Equipment.DataAccess.SiteDepartment)) As List(Of DepartmentWrapper)
        Dim wrapperList As New List(Of DepartmentWrapper)

        For Each l In departmentSource
            Dim w As New DepartmentWrapper
            w.SiteID = l.ParentID
            w.ID = l.ID
            w.Description = l.Description
            wrapperList.Add(w)
        Next

        Return wrapperList
    End Function
End Class
